using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Turquoise.EntityGenerator.Models.Mapping
{
    public class ActivityGroupLanguageLineHistoryMap : EntityTypeConfiguration<ActivityGroupLanguageLineHistory>
    {
        public ActivityGroupLanguageLineHistoryMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.ActivityGroupName)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.ActivityGroupDescription)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("ActivityGroupLanguageLineHistory");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.ActivityGroupLanguageLineId).HasColumnName("ActivityGroupLanguageLineId");
            this.Property(t => t.ActivityGroupId).HasColumnName("ActivityGroupId");
            this.Property(t => t.LanguageId).HasColumnName("LanguageId");
            this.Property(t => t.ActivityGroupName).HasColumnName("ActivityGroupName");
            this.Property(t => t.ActivityGroupDescription).HasColumnName("ActivityGroupDescription");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
            this.Property(t => t.CreatedBy).HasColumnName("CreatedBy");
            this.Property(t => t.DisplayOrder).HasColumnName("DisplayOrder");
            this.Property(t => t.IsApproved).HasColumnName("IsApproved");
            this.Property(t => t.VersionNo).HasColumnName("VersionNo");
            this.Property(t => t.RestoreVersionNo).HasColumnName("RestoreVersionNo");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
            this.Property(t => t.UpdatedBy).HasColumnName("UpdatedBy");
            this.Property(t => t.IsDeleted).HasColumnName("IsDeleted");
        }
    }
}
